package dao;

import static org.junit.Assert.*;

import java.util.List;

import org.junit.Before;

import entity.Notice;

public class Test {

	@Before
	public void setUp() throws Exception {
	}

	@org.junit.Test
	public void test() {
		//NoticeDao dao = new NoticeDaoImpl();
		//不知道实现类是谁，只知道从工厂里面生产出实例
		NoticeDao dao = new NoticeDaoFactory().factory();
		List<Notice> list = dao.queryNoticeByContent("软件");
		System.out.println(list.size());
		
		/*
		Notice notice = dao.queryById("22a9f1177bd511e7aaec1c1b0daf345d");
		notice.setContent("修改了");
		
		int aa = dao.updateNotice(notice);
		System.out.println(aa);
		
		//System.out.println( dao.queryAll().size()  );
		*/
		
		
	}

}
